package com.good.shopping.auth.fegin;

import com.good.common.base.ServiceConstant;
import com.good.common.utils.R;
import com.good.shopping.auth.vo.SocialUser;
import com.good.shopping.auth.vo.UserLoginVo;
import com.good.shopping.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 远程调用 - 会员服务
 * @author shengren.yan
 * @create 2022-03-04
 */
@FeignClient(value = ServiceConstant.SERVICE_MEMBER_NAME)
public interface MemberFeignService {

    // 注册
    @PostMapping("/member/member/register")
    R regist(@RequestBody UserRegisterVo userRegisterVo);

    // 登录
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    // 微博登录
    @PostMapping("/member/member/oauth2/login")
    R oauth2Login(@RequestBody SocialUser vo) throws Exception;

    // 微信登录
    @PostMapping(value = "/member/member/weixin/login")
    R weixinLogin(@RequestParam("accessTokenInfo") String accessTokenInfo);

}
